const { defineConfig } = require('@vue/cli-service')
const path = require('path')
module.exports = defineConfig({
  transpileDependencies: true,
  configureWebpack:{
    resolve:{
      alias:{
        '@':path.resolve(__dirname,'src/'),
        'api':path.resolve(__dirname,'src/api'),
        'assets':path.resolve(__dirname,'src/assets'),
        'comps':path.resolve(__dirname,'src/components'),
        'directives':path.resolve(__dirname,'src/directives'),
        'filters':path.resolve(__dirname,'src/filters'),
        'mixins':path.resolve(__dirname,'src/mixins'),
        'pages':path.resolve(__dirname,'src/pages'),
        'plugins':path.resolve(__dirname,'src/plugins'),
        'router':path.resolve(__dirname,'src/router'),
        'store':path.resolve(__dirname,'src/store'),
        'utils':path.resolve(__dirname,'src/utils'),
        'styles':path.resolve(__dirname,'src/styles'),
        'layouts':path.resolve(__dirname,'src/layouts'),
      }
    }
  },
  devServer:{
    proxy:{
      '/api':{
        target:'http://124.221.198.104:4000/',
        changeOrigin:true,
        pathRewrite:{'^/api':''}
      }
    }
  }
})
